package resp

import (
	"ginblog/enum"
	"github.com/gin-gonic/gin"
	"net/http"
)

type Resp struct {
}

func (r Resp) RespData(status enum.Code, code string, msg interface{}, c *gin.Context) {
	c.JSON(http.StatusOK, gin.H{
		"status":  status,
		"message": code,
		"data":    msg,
	})
}
